<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<c:if test="${includeBody}">
<head>
    <title><fmt:message key="userFaverite" /></title>
</head>
<body>
</c:if>
    <div id="userFaveriteSearchResultFragment">
        <h1><fmt:message key="userFaverite" /></h1>
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                dojo.query(".userFaveriteAjaxSearch").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        params: { decorator: "none" }
                    }));
                })

                dojo.query(".userFaveriteAjaxDelete").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        popup: "true",
                        params: { decorator: "none" }
                    }));
                })
				dojo.query("a.ajaxPagerLink").forEach(function(element) {
					Spring.addDecoration(new Spring.AjaxEventDecoration({
						elementId: element.id,
						event: "onclick",
						params: { decorator: "none" }
					}));
				})
            });
        </script>
        <c:url var="searchUrl" value="/domain/userFaverite/searchAjax"/>
        <table class="listEntities">
            <thead>
                <tr>
                    <th scope="col">&nbsp;</th>
                    <th scope="col">
                        <a id="sortLinkloginName" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.loginNameQueryStringForSortableHeader}">
                            <fmt:message key="user_loginName"/>&nbsp;${userFaveriteSearchForm.loginNameSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkmodDate" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.modDateQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_modDate"/>&nbsp;${userFaveriteSearchForm.modDateSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkuserFaverite" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.titleQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_title"/>&nbsp;${userFaveriteSearchForm.titleSortStatusKey}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinklistPrice_" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.listPriceQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_listPrice"/>&nbsp;${userFaveriteSearchForm.listPriceSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinksalePrice_" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.salePriceQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_salePrice"/>&nbsp;${userFaveriteSearchForm.salePriceSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkshowOnMenu_" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.showOnMenuQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_showOnMenu"/>&nbsp;${userFaveriteSearchForm.showOnMenuSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinktype_" class="userFaveriteAjaxSearch" href="${searchUrl}?${userFaveriteSearchForm.typeQueryStringForSortableHeader}">
                            <fmt:message key="userFaverite_type"/>&nbsp;${userFaveriteSearchForm.typeSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${userFaverites}" var="userFaverite">
                <tr>
					<td>
						<img src="${adminHttpUrl}${userFaverite.path}" width="60" height="60" />
					</td>
                    <td>
						<c:url var="userUrl" value="/domain/user/show">
                            <c:param name="user.inode" value="${userFaverite.userInode}"/>
                        </c:url>
						<a href="${userUrl}"><c:out value="${userFaverite.user.loginName}"/></a>
                    </td>
                    <td>
                        <c:out value="${userFaverite.modDate}"/>
                    </td>
                    <td>
						<c:url var="contentUrl" value="/domain/contentlet/show">
                            <c:param name="contentlet.inode" value="${userFaverite.contentletInode}"/>
                        </c:url>
						<a href="${contentUrl}"><c:out value="${userFaverite.title}"/></a>
                    </td>
                    <td>
                        <c:out value="${userFaverite.listPrice}"/>
                    </td>
                    <td>
                        <c:out value="${userFaverite.salePrice}"/>
                    </td>
                    <td>
                        <c:out value="${userFaverite.showOnMenu}"/>
                    </td>
                    <td>
                        <c:out value="${userFaverite.typeName}"/>
                    </td>

                    <td>
                        <c:url var="confirmDeleteUrl" value="/domain/userFaverite/confirmDelete">
                            <c:param name="inode" value="${userFaverite.inode}"/>
                        </c:url>
                        <a class="actionDelete userFaveriteAjaxDelete" id="confirmDeleteUrl${firstName.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="17">
                        <p>
                            <tags:navigation pager="${pagerDisplay}" url="${searchUrl}" form="${userFaveriteSearchForm}"/>
                        </p>
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
<c:if test="${includeBody}">
</body>
</c:if>